package com.mzj.saas.mservice.smartlock.controller;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mzj.saas.commons.ResultBean;
import com.mzj.saas.mservice.smartlock.service.tianwanghulian.FourEventHandleService;
import com.mzj.saas.mservice.smartlock.vo.DevMacStateVO;
import com.mzj.saas.mservice.smartlock.vo.SkynetInternetVO;
import com.mzj.saas.mservice.smartlock.vo.SkynetInternetsVO;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("lock")
public class SkynetInternetController {

    @Autowired
    private FourEventHandleService fourEventHandleService;


    /**
     * 天王互联配置推送
     *
     * @param skynetInternet
     * @return
     */
    @PostMapping("/callback")
    @ResponseBody
    public ResultBean<String> SkynetInternetWarn(@RequestBody SkynetInternetsVO skynetInternet) {
        if(ObjectUtil.isEmpty(skynetInternet)){
            return ResultBean.failedResultWithMsg("参数不能为空");
        }
        return fourEventHandleService.SkynetInternetWarn(skynetInternet);
    }

}
